With Transaction Statements
Some applications, such as databases, support the notion of a transaction-that is, a sequence of related events that should be performed as if they were
a single operation. The With Transaction statement allows you to specify transactions for such applications.At the beginning of a With Transaction statement, AppleScript requests a transaction ID from the target application (established by an enclosing Tell statement) and attaches that transaction ID to every Apple event it sends to
the target application as a result of executing commands in the body of the With Transaction statement.Whenever AppleScript exits a With Transaction statement, it informs the application that the transaction is over, even if the exit occurs before the end
of the statement because of an error. Thus, if an error occurs within the body
of the With Transaction statement but is not handled within the statement, AppleScript exits the statement, the application is informed that the transaction is over, and the error continues through subsequent statements until it
is handled.